package com.learn.hibernatevalidator.chapter06.basic;

import jakarta.validation.constraints.NotNull;
import lombok.Data;

/**
 * @author: liyf
 * @create: 2025-01-07 23:07
 **/
@Data
public class ContactDetails {

    @NotNull(
            message = "Name is mandatory",
            payload = Severity.Error.class
    )
    private String name;

    @NotNull(
            message = "Phone number not specified, but no mandatory",
            payload = Severity.Info.class
    )
//    @CheckCase(CaseMode.UPPER)
    @CheckCase(value = CaseMode.UPPER)
    private String phoneNumber;
}
